package dataAnalyze.iteration1;

import java.util.HashMap;
import java.util.Map;
import java.util.Vector;

public class Analyzer {
	
	public Map<Integer, Vector<Integer>> user_rating_record = null;
	public Map<Integer, Movie> movies = null;
	public Map<Integer, Vector<Integer>> testSet = null;//movie_id, user_id
	private BaseLine1 bp1;

	public Analyzer()
	{
		bp1 = new BaseLine1();
	}
	
	public static void main(String[] args)
	{
		Analyzer analyzer = new Analyzer();
		analyzer.movies = ImportData.importMovie(ImportData.movieFile);
		System.out.println("ImportMovie Finished!!!");
		analyzer.user_rating_record = ImportData.importRating(ImportData.trainingSetPath, analyzer.movies);
		System.out.println("ImportRating Finished!!!");
		analyzer.testSet = ImportData.buildTest(ImportData.testFile);
		System.out.println("BuildTest Finished!!!");
		analyzer.bp1.getResult(analyzer.movies, analyzer.user_rating_record, analyzer.testSet);
	}

}
